﻿@model KPIS.GERP.Models.FIM.MasBank

@{
    ViewBag.Title = ViewBag.TitleNav = "แก้ไข \"" + Model.Name + "\"";
}

@using (Html.BeginForm("Edit", "MasBank", FormMethod.Post, new { @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()

    <div class="block-button-menu-above">
        @Html.ButtonViewAll()
        @Html.ButtonSubmit()
        @Html.ButtonCancel(new { id = Model.BankId })
    </div>
    
    <div class="alert-error">@Html.ValidationSummary()</div>
    @Html.Partial("_EditorForm")
}

@section scripts
{
    <script>
        $("form").submit(function (e) {
            e.preventDefault();
            var currentForm = this;
            bootbox.confirm(function (result) {
                if (result) {
                    currentForm.submit();
                }
            });
        });

    </script>
}